import request from '@/utils/request'

/**
 * 添加预案元素接口
 * @param {*} data 
 * @returns 
 */
export function addElement(data) {
  return request({
    url: '/pla/base/insertPlaElement',
    method: 'post',
    data: data
  })
}

/**
 * 修改预案元素接口
 * @param {*} data 
 * @returns 
 */
export function editElement(data) {
  return request({
    url: '/pla/base/updatePlaElement',
    method: 'put',
    data: data
  })
}

/**
 * 删除预案元素接口
 * @param {*} data 
 * @returns 
 */
export function delElement(elementId) {
  return request({
    url: '/pla/base/deletePlaElement/' + elementId,
    method: 'delete'
  })
}

/**
 * 调整预案元素排序接口
 * @param {*} data 
 * @returns 
 */
export function sortElement(data) {
  return request({
    url: '/pla/base/updateSort',
    method: 'put',
    data: data
  })
}